<!DOCTYPE html>
<html>
	<head>
	    <meta charset="UTF-8">
	    <title>行政检查行为</title>
		<script src="../../js/header.js"></script>
	    <style>
	    	html, body, #administrativeInspection {
				padding: 0px;
				margin: 0px;
				height: 100%;
			}
			#administrativeInspection{
				border-top: 3px solid #0D9AFF;
				background: #FFFFFF;
				box-shadow: 0px 2px 4px 0 rgba(200,200,200,0.50);
				padding: 25px;
				background: url(../../images/bg.png) no-repeat;
				background-size: 100% 100%;
				/*background-attachment: fixed;*/
				overflow: hidden;
			}
			.tab-title{
				font-size: 16px;
				font-weight: bold;
				border-left: 4px solid #0D9AFF;
				font-family: PingFangSC-Medium;
				padding-left:10px;
				margin-bottom: 20px;
			}
			.el-dialog__footer {
				padding: 10px 20px 20px;
				text-align: center;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
			}
			.el-dialog__body {
				color: rgb(96, 98, 102);
				font-size: 14px;
				word-break: break-all;
				padding: 0px 20px;
			}
			#excel {
				display: none;
			}
			.el-input__inner {
				-webkit-appearance: none;
				background-color: #FFF;
				background-image: none;
				border-radius: 4px;
				border: 1px solid #DCDFE6;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
				color: #606266;
				display: inline-block;
				font-size: inherit;
				height: 30px;
				line-height: 30px;
				outline: 0;
				padding: 0 15px;
				-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
				transition: border-color .2s cubic-bezier(.645,.045,.355,1);
			}

			.listed .el-form-item__label{
				letter-spacing: 3px;
			}

			.dialogform-labelwidth .el-form-item__label{
				width: 180px;
			}
			.el-textarea {
				width: 95%;
			}

			/* 搜索按钮样式修改 */
			#administrativeInspection .el-button.is-circle.search_btn{
				position: absolute;
				right: 0;
				top: 0;
				border: 0;
				background: none;
			}
			#administrativeInspection .el-button.is-circle.search_btn i{
				font-size: 17px;
			}
	    </style>
	</head>
	<body>
		<div v-cloak id="administrativeInspection">
			<div style="margin-top: 10px;">
				<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
					<el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
						<el-row>
							<el-col :span="8">
								<el-form-item label="监管事项目录编码:" prop="" label-width="150px">
									<el-input v-model="selectForm.superviseItemImplementCode" placeholder="" ></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="检查行为名称:" prop="" label-width="160px">
									<el-input v-model="selectForm.checkActionName" placeholder="" ></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="8">
								<el-form-item label="检查行为编号:" prop="" label-width="150px">
									<el-input v-model="selectForm.checkActionCode" placeholder="" ></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="检查时间:" prop="" label-width="160px">
									<el-date-picker type="date" placeholder="选择日期" v-model="selectForm.checkDate" value-format="yyyy-MM-dd" style="width: 100%;">
									</el-date-picker>
								</el-form-item>
							</el-col>

							<div style="float: right;">
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="apply()">申请</el-button>
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm()">查询</el-button>
								<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm()">重置</el-button>
							</div>
						</el-row>
					</el-form>
				</div>
				
				<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
					<!--<el-table-column type="selection" ></el-table-column>-->
					<el-table-column
						prop="recordUniqueIdentity"
						label="记录唯一标识"
						width="150"
						align="center" >						
					</el-table-column>
					<el-table-column
						prop="superviseItemImplementCode"
						label="监管事项目录编码"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
						prop="checkActionName"
						label="检查行为名称"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
						prop="implementInstitution"
						label="实施机构"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
						prop="superviseObject"
						label="监管对象"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
						prop="administrativeCp"
						label="行政相对人（单位/个人）"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
						prop="checkResult"
						label="检查结果"
						width="200"
						align="center">
					</el-table-column>
					<el-table-column
						prop="checkDate"
						label="检查时间"
						width="150"
						align="center">
					</el-table-column>
					<el-table-column
							label="操作"
							width="300"
							align="center">
						<template slot-scope="scope">
							<el-button size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
							<el-button type="primary" size="mini" @click="edit(scope.$index,scope.row)">修改</el-button>
							<el-button type="danger" size="mini" @click="del(scope.$index,scope.row)">删除</el-button>
						</template>
					</el-table-column>
				</el-table>
				
				<div style="overflow: hidden;">
					<div class="pagination">
						<el-pagination
								@size-change="handleSizeChange"
								@current-change="handleCurrentChange"
								:current-page="currentPage"
								:page-sizes="[10, 20, 30, 40]"
								:page-size="pagesize"
								background
								layout="total, sizes,prev, pager, next"
								:total="tableTotal"
								prev-text="上一页"
								next-text="下一页">
						</el-pagination>
					</div>
				</div>
				
				<el-dialog title="" :visible.sync="dialogForm" center fullscreen>
					<div class="dialogform-labelwidth" style="margin-top: 10px;">
						<el-form :model="adminisitration" :prop="adminisitration" :rules="rules" ref="adminisitration" label-width="150px">
							<!--监管信息表（行政检查行为）信息表-->
							<el-row>
								<el-col :span="10" class="tab-title">
									行政检查行为信息表
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="记录唯一标识:" prop="recordUniqueIdentity" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="取值应符合GB/T 17969.8-2010要求" placement="top-start">
											<el-input v-model="adminisitration.recordUniqueIdentity" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="监管对象:" prop="superviseObject" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="1、企业、个体户、农专社，填写为企业统一社会信用代码；
																								2、自然人时，填写身份证号；
																								3、特种设备时，填写生产企业统一社会信用代码#产品品牌#出厂日期
																								4、为特定产品（食品）时，填写生产企业统一社会信用代码#生产批号
																								5、为特定产品（三种特殊食品）时，填写生产企业统一社会信用代码#生产批号
																								6、特定产品为药品时，填写生产企业统一社会信用代码#生产许可证编号#生产批号
																								7、特定产品为化妆品时，填写生产企业统一社会信用代码#生产许可证编号#生产批号
																								8、特定产品为医疗器械时，填写生产企业统一社会信用代码#注册证编号#生产批号
																								9、为场地场所时，填写场地场所名称#所在地区" placement="top-start">

										<el-input v-model="adminisitration.superviseObject" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="监管事项目录编码:" prop="superviseItemImplementCode" lable-width="180px">
										<el-input v-model="adminisitration.superviseItemImplementCode" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="监管事项检查实施清单编码:" prop="superviseItemCheckIcode" lable-width="180px">
										<el-input v-model="adminisitration.superviseItemCheckIcode" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="检查行为名称:" prop="checkActionName" lable-width="180px">
										<el-input v-model="adminisitration.checkActionName" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="检查行为编号:" prop="checkActionCode" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="行为编号须是唯一编号，可在已有办件编号前加18位实施机构的统一社会信用代码" placement="top-start">
											<el-input v-model="adminisitration.checkActionCode" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="实施机构:" prop="implementInstitution" lable-width="180px">
										<el-input v-model="adminisitration.implementInstitution" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="实施机构编码:" prop="implementInstitutionCode" lable-width="180px">
										<el-input v-model="adminisitration.implementInstitutionCode" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="受委托部门:" prop="entrustDept" lable-width="180px">
										<el-input v-model="adminisitration.entrustDept" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="受委托部门编码:" prop="entrustDeptCode" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="受委托部门的统一社会信用代码" placement="top-start">
											<el-input v-model="adminisitration.entrustDeptCode" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="行政相对人（单位/个人）:" prop="administrativeCp" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="与行政主体对应的另一方当事人，监管责任最终的承担者" placement="top-start">
											<el-input v-model="adminisitration.administrativeCp" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="行政相对人性质:" prop="administrativeCpNa" lable-width="180px">
										<el-select v-model="adminisitration.administrativeCpNa" placeholder="请选择行政相对人性质" :disabled="formDisabled" style="width: 100%;">
											<el-option label="个人" value="1"></el-option>
											<el-option label="法人" value="2"></el-option>
											<el-option label="非法人组织" value="3"></el-option>
											<el-option label="个体工商户" value="4"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="行政相对人证件类型:" prop="administrativeCpCeType" lable-width="180px">
										<el-select v-model="adminisitration.administrativeCpCeType" placeholder="请选择行政相对人证件类型" :disabled="formDisabled" style="width: 100%;">
											<el-option
												v-for="item in cpCeTypeData"
												:key="item.appId"
												:label="item.dictName"
												:value="item.dictName">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="行政相对人(单位/个人)编码:" prop="administrativeCpUiCode" lable-width="180px">\
										<el-tooltip class="item" effect="dark" content="如是单位则填写该单位统一社会信用代码，如是个人则填写相应的证件号码等" placement="top-start">
											<el-input v-model="adminisitration.administrativeCpUiCode" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="注册地址:" prop="addressRegistered" lable-width="180px">
										<el-input v-model="adminisitration.addressRegistered" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="经营地址:" prop="addressOperating" lable-width="180px">
										<el-input v-model="adminisitration.addressOperating" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="行政区划代码:" prop="areaNumber" lable-width="180px">
										<el-input v-model="adminisitration.areaNumber" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="检查形式:" prop="checkForm" lable-width="180px">
		                                <el-select v-model="adminisitration.checkForm" placeholder="请选择检查形式" :disabled="formDisabled"  style="width: 100%;">
											<el-option label="日常检查" value="1"></el-option>
											<el-option label="专项检查" value="2"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="检查类别:" prop="checkType" lable-width="180px">
		                                <el-select v-model="adminisitration.checkType" placeholder="请选择检查类别" :disabled="formDisabled"  style="width: 100%;">
											<el-option label="现场检查" value="1"></el-option>
											<el-option label="非现场检查" value="2"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="检查方式:" prop="checkMode" lable-width="180px">
										<el-select v-model="adminisitration.checkMode" placeholder="请选择检查方式" :disabled="formDisabled"  style="width: 100%;">
											<el-option label="“双随机、一公开”监管" value="1"></el-option>
											<el-option label="重点监管" value="2"></el-option>
											<el-option label="信用监管" value="3"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="检查结果:" prop="checkResult" lable-width="180px">
		                                <el-select v-model="adminisitration.checkResult" placeholder="请选择检查结果" :disabled="formDisabled"  style="width: 100%;">
											<el-option
												v-for="item in checkResultData"
												:key="item.appId"
												:label="item.dictName"
												:value="item.dictName">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="检查时间:" prop="checkDate" lable-width="180px">
										<el-date-picker type="date" placeholder="选择日期" v-model="adminisitration.checkDate" value-format="yyyy-MM-dd" :disabled="formDisabled" style="width: 100%;">
										</el-date-picker>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="检查人员:" prop="checkPersonnel" lable-width="180px" :rules="rules.checkPersonnel">
										<el-tooltip class="item" effect="dark" content="填报进行检查的人员名称，填报检查人数不少于2人" placement="top-start">
											<el-input v-model="adminisitration.checkPersonnel" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="执法监管人员:" prop="checkPersonnelCode" lable-width="180px">
										<el-tooltip class="item" effect="dark" content="执法证号与对应执法人员名称的顺序保持一致" placement="top-start">
											<el-input v-model="adminisitration.checkPersonnelCode" placeholder="" :disabled="formDisabled"></el-input>
										</el-tooltip>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="10">
									<el-form-item label="报送时间:" prop="submittedDate" lable-width="180px">
										<el-date-picker type="date" placeholder="选择日期" v-model="adminisitration.submittedDate" value-format="yyyy-MM-dd" :disabled="formDisabled" style="width: 100%;">
										</el-date-picker>
									</el-form-item>
								</el-col>
								<el-col :span="10">
									<el-form-item label="报送人员:" prop="submittedPersonnel" lable-width="180px">
										<el-input v-model="adminisitration.submittedPersonnel" placeholder="" :disabled="formDisabled"></el-input>
									</el-form-item>
								</el-col>
							</el-row>
							<el-row>
						<el-col :span="22">
							<div style="float:right;">
								<el-button v-show="showOnSubmit" type="primary" size="small" style="width: 60px;height: 30px;" @click="onSubmit()">提交</el-button>
								<el-button v-show="showOnReplace" type="primary" size="small" style="width: 60px;height: 30px;" @click="onReplace()">修改</el-button>
								<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogForm = false;clearForm()">取消</el-button>
							</div>
						</el-col>
					</el-row>
						</el-form>
					</div>
				</el-dialog>
				
			</div>
		</div>
	</body>
	<script>
		var vm = new Vue({
			el: '#administrativeInspection',
			data(){
				return{
                    currentPage: 1, //默认显示页面为1
                    pagesize: 5, // 每页的数据条数
                    tableTotal:'',
                    tableData: [],
					cpCeTypeData: [],//行政相对人证件类型
					checkResultData: [],//检查结果
					adminisitration: {
						actionId: '',
    					recordUniqueIdentity: '',
					    superviseItemImplementCode: '',
					    superviseItemCheckIcode: '',
					    checkActionCode: '',
					    checkActionName: '',
					   	implementInstitution: '',
					    implementInstitutionCode: '',
					    entrustDept: '',
					    entrustDeptCode: '',
					    superviseObject: '',
					    administrativeCp: '',
					    administrativeCpNa: '',
					    administrativeCpCeType: '',
					    administrativeCpUiCode: '',
					    addressRegistered: '',
					    addressOperating: '',
					    areaNumber: '',
					    checkForm: '1',
					    checkType: '1',
					    checkMode: '1',
					    checkResult: '',
					    checkDate: '',
					    checkPersonnel: '',
					    checkPersonnelCode: '',
					    submittedDate: '',
					    submittedPersonnel: '',
					    delFlag: '',
					    creatTime: '',
					    creatPreson: ''
					},
					selectForm: {
	                    superviseItemImplementCode: '',
	                    checkActionName: '',
	                    checkActionCode: '',
	                    checkDate: '',
                	},
					rules:{
						recordUniqueIdentity: [{
	                        required: true,
	                        message: '请输入记录唯一标识',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        superviseObject: [{
                            required: false,
                            message: '请输入监管对象',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    superviseItemImplementCode: [{
	                        required: true,
	                        message: '请输入监管事项目录编码',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    superviseItemCheckIcode: [{
	                        required: true,
	                        message: '请输入监管事项检查实施清单编码',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkActionName: [{
	                        required: true,
	                        message: '请输入检查行为名称',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkActionCode: [{
	                        required: true,
	                        message: '请输入检查行为编号',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    implementInstitution: [{
	                        required: true,
	                        message: '请输入实施机构',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    implementInstitutionCode: [{
	                        required: true,
	                        message: '请输入实施机构编码',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        entrustDept: [{
                            required: false,
                            message: '请输入受委托部门',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        entrustDeptCode: [{
                            required: false,
                            message: '请输入受委托部门编码',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    administrativeCp: [{
	                        required: true,
	                        message: '请输入行政相对人（单位/个人）',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    administrativeCpNa: [{
	                        required: true,
	                        message: '请输入行政相对人性质',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    administrativeCpCeType: [{
	                        required: true,
	                        message: '请输入行政相对人证件类型',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    administrativeCpUiCode: [{
	                        required: true,
	                        message: '请输入行政相对人(单位/个人)编码',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        addressRegistered: [{
                            required: false,
                            message: '请输入注册地址',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        addressOperating: [{
                            required: false,
                            message: '请输入经营地址',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        areaNumber: [{
	                        required: true,
	                        message: '请输入行政区划代码',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkForm: [{
	                        required: true,
	                        message: '请选择检查形式',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkType: [{
	                        required: true,
	                        message: '请选择检查类别',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkMode: [{
	                        required: false,
	                        message: '请选择检查方式',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    checkResult: [{
	                        required: true,
	                        message: '请输入检查结果',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    
	                    checkDate: [{
	                        required: true,
	                        message: '请选择检查时间',
	                        trigger: 'blur'
	                    }],
	                    checkPersonnel: [{
	                        required: true,
	                        message: '请输入检查人员',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
                        checkPersonnelCode: [{
                            required: false,
                            message: '请输入执法监管人员',
                            trigger: 'blur'
                        },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    submittedDate: [{
	                        required: true,
	                        message: '请选择报送时间',
	                        trigger: 'blur'
	                    }],
	                    submittedPersonnel: [{
	                        required: true,
	                        message: '请输入报送人员',
	                        trigger: 'blur'
	                    },{
                            max:50,
                            message: '长度最大为50字符',
                            trigger: 'blur'
                        }],
	                    
					},
					formDisabled: false,
					dialogForm: false,
					showOnSubmit: true,
                	showOnReplace: false
				}
			},
			created(){
				/*行政相对人证件类型 */
	            axios.post('/dzjap/dict/getdict/d_administrativeCpCeType').then(res => {
	                this.cpCeTypeData = res.data.data.result;
				}).catch(e => {
					this.$message.error("网络连接超时");
				})
				
				/* 检查结果 */
	            axios.post('/dzjap/dict/getdict/d_checkResult').then(res => {
	                this.checkResultData = res.data.data.result;
				}).catch(e => {
					this.$message.error("网络连接超时");
				})
			},
			mounted(){
				this.getData();
			},
			methods: {
				getData(){
					var pagesize = this.pagesize;
	                var pageno = this.currentPage;
	
	                axios({
	                    method: 'get',
	                    url: '/dzjap/check/getAllCheck',
	                    params: {
	                        pageSize: pagesize,
	                        pageNo: pageno
	                    }
	                })
					.then(response => {
						let data = response.data;
						if (data.code == 200) {
							let dataInformation = data.data.results;
							this.tableTotal = data.data.total;// 数据长度
	
							this.tableData = dataInformation;
						} else {
							this.$message.error(data.msg);
						}
					})
					.catch(function (error) {
						console.log(error);
					});
				},
				clearForm(){
				    this.$refs.adminisitration.clearValidate();
				    this.adminisitration.actionCode='';
	                this.adminisitration.recordUniqueIdentity = '';
	                this.adminisitration.superviseItemImplementCode = '';
	                this.adminisitration.superviseItemCheckIcode = '';
	                this.adminisitration.checkActionCode = '';
	                this.adminisitration.checkActionName = '';
	                this.adminisitration.implementInstitution = '';
	                this.adminisitration.implementInstitutionCode = '';
	                this.adminisitration.entrustDept = '';
					this.adminisitration.entrustDeptCode = '';
					this.adminisitration.superviseObject = '';
					this.adminisitration.administrativeCp = '';
					this.adminisitration.administrativeCpNa = '';
					this.adminisitration.administrativeCpCeType = '';
					this.adminisitration.administrativeCpUiCode = '';
					this.adminisitration.addressRegistered = '';
					this.adminisitration.addressOperating = '';
					this.adminisitration.areaNumber = '';
					this.adminisitration.checkForm = '1';
					this.adminisitration.checkType = '1';				
					this.adminisitration.checkMode = '1';
					this.adminisitration.checkResult = '';
					this.adminisitration.checkDate = '';
					this.adminisitration.checkPersonnel = '';
					this.adminisitration.checkPersonnelCode = '';
					this.adminisitration.submittedDate = '';
					this.adminisitration.submittedPersonnel = '';
	            },
				apply(){
	                this.dialogForm = true;
	                this.showOnSubmit = true;
	                this.showOnReplace = false;
	
	                this.clearForm();
	
	                this.formDisabled = false;
	            },
                /* 列表页搜索 */
                searchForm() {
                    var pagesize = this.pagesize;
                    var pageno = this.currentPage;
                    axios({
                        method: 'get',
                        url: '/dzjap/check/getAllContation',
                        params: {
                            pageSize: pagesize,
                            pageNo: pageno,
                            superviseItemImplementCode: this.selectForm.superviseItemImplementCode,
                            checkActionName: this.selectForm.checkActionName,
                            checkActionCode: this.selectForm.checkActionCode,
                            checkDate: this.selectForm.checkDate
                        }
                    })
                        .then(response => {
                            let data = response.data;
                            if (data.code == 200) {
                                let dataInformation = data.data.results;
                                this.tableTotal = data.data.total;// 数据长度

                                this.tableData = dataInformation;
                            } else {
                                this.$message.error(data.msg);
                            }
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                },
                /* 列表页重置 */
                resetForm() {
                    this.selectForm.superviseItemImplementCode = '';
                    this.selectForm.checkActionName = '';
                    this.selectForm.checkActionCode = '',
					this.selectForm.checkDate = '',
                    this.getData();
                },
                // 表单提交
                onSubmit() {
                    this.$refs.adminisitration.validate(valid => {
                        if (valid) {
							axios({
								method: 'post',
								url: '/dzjap/check/addCheck',
								data: this.adminisitration
							})
								.then((response) => {
									let data = response.data;
									if (data.code == 200) {
										this.dialogForm = false;
										this.$message({
											type: 'success',
											message: '添加成功!'
										});
										this.getData();
									} else {
										this.$message.error(data.msg);
									}
								});
                        }else{
							console.log("必填项不能为空！");
							return false;
						}
                    });
                },
                // 表单修改
                onReplace(){
                    axios({
                        method: 'post',
                        url: '/dzjap/check/upCheck',
                        data: this.adminisitration
                    })
                        .then((response) => {
                            let data = response.data;
                            if (data.code == 200) {
                                this.dialogForm = false;
                                this.$message({
                                    type: 'success',
                                    message: '修改成功!'
                                });
                                this.getData();
                            } else {
                                this.$message.error(data.msg);
                            }
                        });
                },
                // 查看
                view(index,row){
                    this.dialogForm = true;
                    this.showOnReplace = false;
                    this.showOnSubmit = false;

                    this.showInformation(index,row);
                    this.checkDisabled(true);
                },
                // 修改
                edit(index,row){
                    this.dialogForm = true;
                    this.showOnReplace = true;
                    this.showOnSubmit = false;

                    this.showInformation(index,row);
                    this.checkDisabled(false);
                },
                // 删除
                del(index,row){
                    this.$confirm('确定要删除吗?', '提示', {
                        cancelButtonText: '取消',
                        confirmButtonText: '确定',
                        type: 'warning'
                    }).then(() => {
                        axios({
                            method: 'post',
                            url: '/dzjap/check/delCheck/',
							params: {
                                actionId:row.actionId
                            }
                        })
                            .then(response => {
                                let data = response.data;

                                if (data.code == 200) {
                                    // 确认删除
                                    this.$message({
                                        type: 'success',
                                        message: '删除成功!'
                                    });
                                    this.getData();
                                } else {
                                    this.$message.error(data.msg);
                                }
                            })
                            .catch(function (error) {
                                console.log(error);
                            });
                    }).catch(() => {
                        this.$message({
                            type: 'info',
                            message: '取消删除'
                        });
                    });
                },
                // 公共方法--查看
                showInformation(index,row){
                    axios({
                        method: 'get',
                        url: '/dzjap/check/getCheck',
                        params: {
                            actionId: row.actionId
                        }
                    })
                        .then(response => {
                            let data = response.data;
                            if (data.code == 200) {
                                let rowdata = response.data.data;
                                this.clearForm(); // 重置

                                this.adminisitration = rowdata;
                            } else {
                                this.$message.error(data.msg);
                            }
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                },
	             //每页下拉显示数据
	            handleSizeChange(size) {
	                this.pagesize = size;
	                this.getData();
	                /*console.log(this.pagesize) */
	            },
	            //点击第几页
	            handleCurrentChange(currentPage) {
	                this.currentPage = currentPage;
	                this.getData();
	            },
	            // 设置允许填写和不允许填写
	            checkDisabled(n){
	                if(n){
	                    this.formDisabled = true;
	                }else{
	                    this.formDisabled = false;
	                }
	            },
			}
		})
		
	</script>
</html>
